a1be61ca6efd4a91224ebe6ca8c6d6f68a259dea,src/core/ArcadeMachine.java,ArcadeMachine,runOneGeneratedLevel,#String#boolean#String#String#String#number#boolean#,236

Before Change


            score = toPlay.runGame(p, randomSeed)[0];

        //Finally, when the game is over, we need to tear the player down.
        if(! ArcadeMachine.tearPlayerDown(toPlay, p, actionFile, randomSeed, true) )
            return toPlay.handleResult()[0];

        return score;
    }

After Change



            //Get the score for the result.
            double result = toPlay.handleResult()[0];
            toPlay.printResult();
            return result;
        }

        //Then, play the game.
        double score = 0.0;

        /**
         * playGame and runGame methods from the Game class take an array of players as argument,
         * including all players in the game. As this method refers to single player
         * games, an array is created containing only one element: the player created earlier.
         * To get back just 1 score for the player, the first element in the score array is returned.
         */
        AbstractPlayer[] p = new AbstractPlayer[0];
        p[0] = player;

        if(visuals)
            score = toPlay.playGame(p, randomSeed, isHuman, 0)[0];
        else
            score = toPlay.runGame(p, randomSeed)[0];

        //Finally, when the game is over, we need to tear the player down.
        ArcadeMachine.tearPlayerDown(toPlay, p, actionFile, randomSeed, true);

        double result = toPlay.handleResult()[0];
        toPlay.printResult();